package com.project.bean;
/**
 * 地址实体类
 */
public class AddressBean {
    /**地址id*/
    private int id;
    /**收货人姓名*/
    private String name;
    /**收货人电话*/
    private String tel;
    /**收货地址*/
    private String address;
    /**宠主对象*/
    private UserBean user;

    public AddressBean() {
    }

    public AddressBean(String name, String tel, String address, Integer userId) {
        this.name = name;
        this.tel = tel;
        this.address = address;
        this.user = new UserBean();
        this.user.setId(userId);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "AddressBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", tel='" + tel + '\'' +
                ", address='" + address + '\'' +
                ", user=" + user +
                '}';
    }
}

